#! /bin/sh
. "${srcdir=.}/init.sh"; path_prepend_ . ../src

# Test JavaScript support: CDATA section.

cat <<\EOF > xg-js-10a.js
<![CDATA[]]>
EOF

cat <<\EOF > xg-js-10b.js
<![CDATA[A CDATA section can contain all sort of unescaped characters: >, <, /, etc.]]>
EOF

: ${XGETTEXT=xgettext}
LANGUAGE= LC_ALL=C ${XGETTEXT} --no-location -d xg-js-10.tmp xg-js-10a.js 2>xg-js-10.err
result=$?
cat xg-js-10.err
test $result = 0 || Exit 1

: ${XGETTEXT=xgettext}
LANGUAGE= LC_ALL=C ${XGETTEXT} --no-location -d xg-js-10.tmp xg-js-10b.js 2>xg-js-10.err
result=$?
cat xg-js-10.err
test $result = 0 || Exit 1

exit 0
